package test;

public class LegalNumber {
    static int[] num = new int[]{1,2,3,4,5,6,7,8,9,10};
    static int legalNum = 0;
    static int wrongNum = 0;
    public static void main(String[] args) {
        legal();
        System.out.println(legalNum);
        System.out.println(wrongNum);
    }
    public static void legal(){
        for (int i = 0; i < num.length; i++) {
            switch (num[i]){
                case 1:
                case 2:
                case 3:
                    legalNum ++;
                    break;
                default:
                    wrongNum ++;
                    break;
            }
        }
    }
}
